Actors That Unify Threads and Events
نویسندگان
چکیده
There is an impedance mismatch between message-passing concurrency and virtual machines, such as the JVM. VMs usually map their threads to heavyweight OS processes. Without a lightweight process abstraction, users are often forced to write parts of concurrent applications in an event-driven style which obscures control flow, and increases the burden on the programmer. In this paper we show how thread-based and event-based programming can be unified under a single actor abstraction. Using advanced abstraction mechanisms of the Scala programming language, we implemented our approach on unmodified JVMs. Our programming model integrates well with the threading model of the underlying VM.
منابع مشابه
An Object-Oriented Programming Model for Event-Based Actors
Actors are concurrent processes which communicate through asynchronous message passing. Most existing actor languages and libraries implement actors using virtual machine or operating system threads. The resulting actor abstractions are rather heavyweight, both in terms of memory consumption and synchronization. Consequently, their systems are not suited for resource-constrained devices or high...
متن کاملFrom Events to Reactions: A Progress Report
SYNDICATE is a new coordinated, concurrent programming language. It occupies a novel point on the spectrum between the shared-everything paradigm of threads and the shared-nothing approach of actors. SYNDICATE actors exchange messages and share common knowledge via a carefully controlled database that clearly scopes conversations. This approach clearly simplifies coordination of concurrent acti...
متن کاملA Language-based Approach to Unifying Events and Threads
This paper presents a language-based technique to unify two seemingly opposite programming models for building massively concurrent network services: the eventdriven model and the multithreaded model. The result is a unified concurrency model providing both thread abstractions and event abstractions. Using this model, each component in an application can be implemented using the appropriate abs...
متن کاملHow DoesStrawson Unify Epistemology, Ontology and Logic
Strawson’s conception of analysis as a ‘connective linguistic analysis’ makes it possible for him to achieve an indefinitely large range of ideas or concepts among them are certain numbers of fundamental, general and pervasive concepts or concept-types which not only are pre-theoretical or ahistorical, but also together constitute a structural framework only within whichlogic, ontology and epis...
متن کاملMulti-agent System Simulation in Scala: An Evaluation of Actors for Parallel Simulation
Multi-agent system (MAS) simulation, a growing field within artificial intelligence, requires the creation of high-performance, parallel, and user-friendly simulation frameworks. The standard approach is to use threads and shared memory. The drawbacks of this approach are the common concurrency pitfalls of race conditions and performance loss due to synchronization. Our goal was to evaluate the...
متن کامل